﻿namespace Little.Soldier.SWIFT.Validation
{
  public class ValidationError
  {
    private string U0001 = string.Empty;
    private string U0003 = string.Empty;
    private object U0002;
    private ValidationErrorType U0004;

    public virtual string Description
    {
      get
      {
        return this.U0001;
      }
      set
      {
        this.U0001 = value;
      }
    }

    public virtual object ParentPropertyObject
    {
      get
      {
        return this.U0002;
      }
      set
      {
        this.U0002 = value;
      }
    }

    public virtual string PropertyName
    {
      get
      {
        return this.U0003;
      }
      set
      {
        this.U0003 = value;
      }
    }

    public virtual ValidationErrorType Type
    {
      get
      {
        return this.U0004;
      }
      set
      {
        this.U0004 = value;
      }
    }

    public ValidationError(ValidationErrorType type, string description)
    {
      this.Type = type;
      this.Description = description;
    }

    public ValidationError(ValidationErrorType type, object parentPropertyObject, string propertyName, string description)
    {
      this.Type = type;
      this.ParentPropertyObject = parentPropertyObject;
      this.PropertyName = propertyName;
      this.Description = description;
    }
  }
}
